package com.ibuonline.b2b.entity;

import java.io.Serializable;

public class SysRole implements Serializable {

	private static final long serialVersionUID = 5000454360556480492L;

	//fields
	private java.lang.Integer roleId;
	private java.lang.String roleName;
	private java.lang.String roleDesc;

	//default constructor
	public SysRole() {
	}

	//getter
	public java.lang.Integer getRoleId() {
		return roleId;
	}
	public java.lang.String getRoleName() {
		return roleName;
	}
	public java.lang.String getRoleDesc() {
		return roleDesc;
	}

	//setter
	public void setRoleId(java.lang.Integer roleId) {
		this.roleId = roleId;
	}
	public void setRoleName(java.lang.String roleName) {
		this.roleName = roleName;
	}
	public void setRoleDesc(java.lang.String roleDesc) {
		this.roleDesc = roleDesc;
	}

	//equals method
	public boolean equals(Object other) {
		if (this == other)
			return true;
		if (!(other instanceof SysRole))
			return false;

		final SysRole sysRole = (SysRole)other;
		if (!this.roleId.equals(sysRole.getRoleId()))
			return false;

		return true;
	}

	//hashCode method
	public int hashCode() {
		StringBuffer keys = new StringBuffer();
		keys.append(roleId).append(",");
		if (keys.length() > 0)
			keys.deleteCharAt(keys.length() - 1);
		return keys.toString().hashCode();
	}

	//toString method
	public String toString() {
		return new StringBuilder("SysRole[")
			.append("roleId=").append(roleId).append(", ")
			.append("roleName=").append(roleName).append(", ")
			.append("roleDesc=").append(roleDesc).append("]").toString();
	}
}